import $axios from './request';
/***订单接口 */
// 获取供应商列表
export const orderSupplier = (data) => {
    return $axios.post('ordersConfig/company', data)
}
// 获取银行列表
export const orderPayment = (data) => {
    return $axios.post('ordersConfig/payment', data)
}
// 获取产品列表
export const orderModel = (data) => {
    return $axios.post('ordersConfig/model', data)
}
// 获取品牌列表
export const orderBrand = (data) => {
    return $axios.post('ordersConfig/brand', data)
}
// 获取交期列表
export const orderLeading = (data) => {
    return $axios.post('ordersConfig/leading', data)
}
// 获取货况列表
export const orderCondition = (data) => {
    return $axios.post('ordersConfig/condition', data)
}
// 获取采购列表
export const ordersConfigGetUser = (data) => {
    return $axios.post('ordersConfig/getUser', data)
}
// 获取用户和供应商
export const orderUser = (data) => {
    return $axios.post('ordersConfig/getCustomer', data)
}
// 获取销售的客户
export const ordersConfigGetMissuUser = (data) => {
    return $axios.post('ordersConfig/getMissuUser', data)
}
// 获取货币类型
export const ordersConfigCurrent = (data) => {
    return $axios.post('ordersConfig/current', data)
}
// 创建订单
export const ordersAdd = (data) => {
    return $axios.post('orders/add', data)
}
//  订单列表
export const orderList = (data) => {
    return $axios.post('orders/list', data)
}
// 订单详情
export const orderDetail = (data) => {
    return $axios.post('orders/item', data)
}
// 订单编辑
export const orderEdit = (data) => {
    return $axios.post('orders/edit', data)
}
// 订单删除
export const orderDelete = (data) => {
    return $axios.post('orders/delete', data)
}
// 订单产品删除
export const orderProductDelete = (data) => {
    return $axios.post('orders/deleteItem', data)
}
// 获取订单ID列表
export const oederidList = (data) => {
    return $axios.post('ordersConfig/getOrders', data)
}
// copy to order
export const copyOrder = (data) => {
    return $axios.post('orders/copyOrder', data)
}
// copy to order 保存
export const orderSaveCopyToOrder = (data) => {
    return $axios.post('orders/saveCopyToOrder', data)
}
// from rfq 
export const orderFromRfq = (data) => {
    return $axios.post('orders/rfq', data)
}
// 保存 from rfq
export const orderFromRfqSave = (data) => {
    return $axios.post('orders/doOrder', data)
}
//from qtn
export const orderFromQtn = (data) => {
    return $axios.post('orders/quotation', data)
}
// 获取clearance
export const orderClearance = (data) => {
    return $axios.post('orders/clearance', data)
}
// 保存清关信息
export const orderClearanceSave = (data) => {
    return $axios.post('orders/clearance', data)
}
// 获取产品价格曲线数据
export const ordersProductRecord = (data) => {
    return $axios.post('orders/productRecord', data)
}
// 获取订单小计
export const ordersServiceCharge = (data) => {
    return $axios.post('orders/serviceCharge', data)
}
// 获取发票数据
export const ordersClearanceData = (data) => {
    return $axios.post('orders/clearanceData', data)
}
// 创建采购任务
export const purchaseOrderteskAdd = (data) => {
    return $axios.post('purchaseOrdertesk/add', data)
}
// 获取已采购数据
export const ordersPurchaseTesk = (data) => {
    return $axios.post('orders/purchaseTesk', data)
}
// 获取多条订单明细
export const ordersGetAddShiptaskData = (data) => {
    return $axios.post('orders/getAddShiptaskData', data)
}
// 创建发货任务
export const ordersAddShiptask = (data) => {
    return $axios.post('orders/addShiptask', data)
}
// 获取采购任务列表
export const purchaseOrderTakeList = (data) => {
    return $axios.post('purchaseOrdertesk/list', data)
}
// 获取采购任务详情
export const purchaseOrderteskDetail = (data) => {
    return $axios.post('purchaseOrdertesk/detailed', data)
}
//调配采购任务
export const purchaseOrderteskReassign = (data) => {
    return $axios.post('purchaseOrdertesk/reassign', data)
}
// 退回采购任务
export const purchaseOrderteskCallbackOrder = (data) => {
    return $axios.post('purchaseOrdertesk/callbackOrder', data)
}
// 删除采购任务
export const purchaseOrderteskDelete = (data) => {
    return $axios.post('purchaseOrdertesk/delete', data)
}
//创建采购订单
export const purchaseOrderAdd = (data) => {
    return $axios.post('purchaseOrder/add', data)
}
// 获取采购订单列表
export const purchaseOrderList = (data) => {
    return $axios.post('purchaseOrder/list', data)
}
// 获取采购订单详情
export const purchaseOrderDetailed = (data) => {
    return $axios.post('purchaseOrder/detailed', data)
}
// 导出采购单
export const purchaseOrderExportPurchase = (data) => {
    return $axios.post('purchaseOrder/exportPurchase', data)
}
// 删除采购单
export const purchaseOrderDelete = (data) => {
    return $axios.post('purchaseOrder/delete', data)
}
// 删除采购单详情
export const purchaseOrderDeleteDetailed = (data) => {
    return $axios.post('purchaseOrder/deleteDetailed', data)
}
// 编辑价格
export const purchaseOrderEditPrice = (data) => {
    return $axios.post('purchaseOrder/editPrice', data)
}
/***财务接口 */
// 获取银行列表
export const paymentList = (data) => {
    return $axios.post('payment/list', data)
}
// 获取银行余额
export const paymentBalance = (params = {}) => {
    return $axios.get('payment/balance', { params })
}
// 获取入账信息列表
export const ordersConfigPaymentConfi = (params = {}) => {
    return $axios.get('ordersConfig/paymentConfi', { params })
}
// 获取国家列表
export const ordersConfigCountry = (params = {}) => {
    return $axios.get('ordersConfig/country', { params })
}
// 获取入账记录列表
export const paymentRecord = (data) => {
    return $axios.post('payment/record', data)
}
// 添加入账记录
export const paymentAdd = (data) => {
    return $axios.post('payment/add', data)
}
// 获取出入帐列表
export const ordersConfigPaymentOrders = (data) => {
    return $axios.post('ordersConfig/paymentOrders', data)
}
// 获取编辑入账记录
export const paymentEdit = (data) => {
    return $axios.post('payment/edit', data)
}
// 保存编辑入账记录
export const paymentSaveEdit = (data) => {
    return $axios.post('payment/saveEdit', data)
}


// 获取excel模板
export const ordersExcelTemplate = (data) => {
    return $axios.post('orders/excelTemplate', data)
}
// 导出PI
export const ordersExportPI = (params = {}) => {
    return $axios.get('orders/exportPI', { params })
}

// 财务审核
export const paymentProcess = (data) => {
    return $axios.post('payment/process', data)
}